import request from '@/utils/request'

// 角色列表
export const roleList = (data) => {
  return request({
    method: 'POST',
    url: '/sys/role/lists',
    data
  })
}

// 编辑
export const roleInfo = (id) => {
  return request({
    method: 'GET',
    url: `/sys/role/info/${id}`
  })
}

// 菜单树
export const menuNav = () => {
  return request({
    method: 'GET',
    url: '/sys/menu/nav'
  })
}

// 新增
export const roleSave = (data) => {
  return request({
    method: 'POST',
    url: '/sys/role/save',
    data
  })
}

// 修改
export const roleUpdate = (data) => {
  return request({
    method: 'POST',
    url: '/sys/role/update',
    data
  })
}

// 删除
export const roleDelete = (data) => {
  return request({
    method: 'POST',
    url: '/sys/role/delete',
    data
  })
}
